#[derive(Copy, Clone)]
#[repr(C)]
pub struct _HashTable {
    pub table: *mut *mut HashTableEntry,
    pub table_size: libc::c_uint,
    pub hash_func: HashTableHashFunc,
    pub equal_func: HashTableEqualFunc,
    pub key_free_func: HashTableKeyFreeFunc,
    pub value_free_func: HashTableValueFreeFunc,
    pub entries: libc::c_uint,
    pub prime_index: libc::c_uint,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _HashTableEntry {
    pub pair: HashTablePair,
    pub next: *mut HashTableEntry,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _HashTableIterator {
    pub hash_table: *mut HashTable,
    pub next_entry: *mut HashTableEntry,
    pub next_chain: libc::c_uint,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _HashTablePair {
    pub key: HashTableKey,
    pub value: HashTableValue,
}


pub type size_t = libc::c_ulong;


pub type UnitTestFunction = Option::<unsafe extern "C" fn() -> ()>;


pub type HashTable = _HashTable;


pub type HashTableEntry = _HashTableEntry;


pub type HashTableIterator = _HashTableIterator;


pub type HashTableKey = *mut libc::c_void;


pub type HashTableValue = *mut libc::c_void;


pub type HashTablePair = _HashTablePair;


pub type HashTableHashFunc = Option::<
    unsafe extern "C" fn(HashTableKey) -> libc::c_uint,
>;


pub type HashTableEqualFunc = Option::<
    unsafe extern "C" fn(HashTableKey, HashTableKey) -> libc::c_int,
>;


pub type HashTableKeyFreeFunc = Option::<unsafe extern "C" fn(HashTableKey) -> ()>;


pub type HashTableValueFreeFunc = Option::<unsafe extern "C" fn(HashTableValue) -> ()>;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _Set {
    pub table: *mut *mut SetEntry,
    pub entries: libc::c_uint,
    pub table_size: libc::c_uint,
    pub prime_index: libc::c_uint,
    pub hash_func: SetHashFunc,
    pub equal_func: SetEqualFunc,
    pub free_func: SetFreeFunc,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _SetEntry {
    pub data: SetValue,
    pub next: *mut SetEntry,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _SetIterator {
    pub set: *mut Set,
    pub next_entry: *mut SetEntry,
    pub next_chain: libc::c_uint,
}


pub type Set = _Set;


pub type SetEntry = _SetEntry;


pub type SetIterator = _SetIterator;


pub type SetValue = *mut libc::c_void;


pub type SetHashFunc = Option::<unsafe extern "C" fn(SetValue) -> libc::c_uint>;


pub type SetEqualFunc = Option::<
    unsafe extern "C" fn(SetValue, SetValue) -> libc::c_int,
>;


pub type SetFreeFunc = Option::<unsafe extern "C" fn(SetValue) -> ()>;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _BinaryHeap {
    pub heap_type: BinaryHeapType,
    pub values: *mut BinaryHeapValue,
    pub num_values: libc::c_uint,
    pub alloced_size: libc::c_uint,
    pub compare_func: BinaryHeapCompareFunc,
}


pub type BinaryHeapType = libc::c_uint;


pub type BinaryHeapValue = *mut libc::c_void;


pub type BinaryHeapCompareFunc = Option::<
    unsafe extern "C" fn(BinaryHeapValue, BinaryHeapValue) -> libc::c_int,
>;


pub type BinaryHeap = _BinaryHeap;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _BinomialHeap {
    pub heap_type: BinomialHeapType,
    pub compare_func: BinomialHeapCompareFunc,
    pub num_values: libc::c_uint,
    pub roots: *mut *mut BinomialTree,
    pub roots_length: libc::c_uint,
}


pub type BinomialHeapType = libc::c_uint;


pub type BinomialHeapValue = *mut libc::c_void;


pub type BinomialHeapCompareFunc = Option::<
    unsafe extern "C" fn(BinomialHeapValue, BinomialHeapValue) -> libc::c_int,
>;


pub type BinomialHeap = _BinomialHeap;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _BloomFilter {
    pub hash_func: BloomFilterHashFunc,
    pub table: *mut libc::c_uchar,
    pub table_size: libc::c_uint,
    pub num_functions: libc::c_uint,
}


pub type BloomFilter = _BloomFilter;


pub type BloomFilterValue = *mut libc::c_void;


pub type BloomFilterHashFunc = Option::<
    unsafe extern "C" fn(BloomFilterValue) -> libc::c_uint,
>;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _ListEntry {
    pub data: ListValue,
    pub prev: *mut ListEntry,
    pub next: *mut ListEntry,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _ListIterator {
    pub prev_next: *mut *mut ListEntry,
    pub current: *mut ListEntry,
}


pub type ListEntry = _ListEntry;


pub type ListIterator = _ListIterator;


pub type ListValue = *mut libc::c_void;


pub type ListCompareFunc = Option::<
    unsafe extern "C" fn(ListValue, ListValue) -> libc::c_int,
>;


pub type ListEqualFunc = Option::<
    unsafe extern "C" fn(ListValue, ListValue) -> libc::c_int,
>;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _BlockHeader {
    pub magic_number: libc::c_uint,
    pub bytes: size_t,
}


pub type BlockHeader = _BlockHeader;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _Queue {
    pub head: *mut QueueEntry,
    pub tail: *mut QueueEntry,
}


pub type Queue = _Queue;


pub type QueueValue = *mut libc::c_void;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _SortedArray {
    pub data: *mut SortedArrayValue,
    pub length: libc::c_uint,
    pub _alloced: libc::c_uint,
    pub equ_func: SortedArrayEqualFunc,
    pub cmp_func: SortedArrayCompareFunc,
}


pub type SortedArrayValue = *mut libc::c_void;


pub type SortedArray = _SortedArray;


pub type SortedArrayEqualFunc = Option::<
    unsafe extern "C" fn(SortedArrayValue, SortedArrayValue) -> libc::c_int,
>;


pub type SortedArrayCompareFunc = Option::<
    unsafe extern "C" fn(SortedArrayValue, SortedArrayValue) -> libc::c_int,
>;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _ArrayList {
    pub data: *mut ArrayListValue,
    pub length: libc::c_uint,
    pub _alloced: libc::c_uint,
}


pub type ArrayListValue = *mut libc::c_void;


pub type ArrayList = _ArrayList;


pub type ArrayListEqualFunc = Option::<
    unsafe extern "C" fn(ArrayListValue, ArrayListValue) -> libc::c_int,
>;


pub type ArrayListCompareFunc = Option::<
    unsafe extern "C" fn(ArrayListValue, ArrayListValue) -> libc::c_int,
>;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _SListEntry {
    pub data: SListValue,
    pub next: *mut SListEntry,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _SListIterator {
    pub prev_next: *mut *mut SListEntry,
    pub current: *mut SListEntry,
}


pub type SListEntry = _SListEntry;


pub type SListIterator = _SListIterator;


pub type SListValue = *mut libc::c_void;


pub type SListCompareFunc = Option::<
    unsafe extern "C" fn(SListValue, SListValue) -> libc::c_int,
>;


pub type SListEqualFunc = Option::<
    unsafe extern "C" fn(SListValue, SListValue) -> libc::c_int,
>;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _Trie {
    pub root_node: *mut TrieNode,
}


pub type Trie = _Trie;


pub type TrieValue = *mut libc::c_void;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _RBTree {
    pub root_node: *mut RBTreeNode,
    pub compare_func: RBTreeCompareFunc,
    pub num_nodes: libc::c_int,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _RBTreeNode {
    pub color: RBTreeNodeColor,
    pub key: RBTreeKey,
    pub value: RBTreeValue,
    pub parent: *mut RBTreeNode,
    pub children: [*mut RBTreeNode; 2],
}


pub type RBTree = _RBTree;


pub type RBTreeKey = *mut libc::c_void;


pub type RBTreeValue = *mut libc::c_void;


pub type RBTreeNode = _RBTreeNode;


pub type RBTreeCompareFunc = Option::<
    unsafe extern "C" fn(RBTreeValue, RBTreeValue) -> libc::c_int,
>;


pub type RBTreeNodeSide = libc::c_uint;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _AVLTree {
    pub root_node: *mut AVLTreeNode,
    pub compare_func: AVLTreeCompareFunc,
    pub num_nodes: libc::c_uint,
}

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _AVLTreeNode {
    pub children: [*mut AVLTreeNode; 2],
    pub parent: *mut AVLTreeNode,
    pub key: AVLTreeKey,
    pub value: AVLTreeValue,
    pub height: libc::c_int,
}


pub type AVLTree = _AVLTree;


pub type AVLTreeKey = *mut libc::c_void;


pub type AVLTreeValue = *mut libc::c_void;


pub type AVLTreeNode = _AVLTreeNode;


pub type AVLTreeNodeSide = libc::c_uint;


pub type AVLTreeCompareFunc = Option::<
    unsafe extern "C" fn(AVLTreeValue, AVLTreeValue) -> libc::c_int,
>;


pub type RBTreeNodeColor = libc::c_uint;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _BinomialTree {
    pub value: BinomialHeapValue,
    pub order: libc::c_ushort,
    pub refcount: libc::c_ushort,
    pub subtrees: *mut *mut BinomialTree,
}


pub type BinomialTree = _BinomialTree;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _TrieNode {
    pub data: TrieValue,
    pub use_count: libc::c_uint,
    pub next: [*mut TrieNode; 256],
}


pub type TrieNode = _TrieNode;

#[derive(Copy, Clone)]
#[repr(C)]
pub struct _QueueEntry {
    pub data: QueueValue,
    pub prev: *mut QueueEntry,
    pub next: *mut QueueEntry,
}


pub type QueueEntry = _QueueEntry;